/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
** Qt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/

void Form1::get()
{
   int b;
   b=onoff->value();
   //printf("%d",b);
   char a,c;
   //a=b/10+48;
   c=b%10+'0';
   //printf("%c,%d",c,b);
   FILE *fp;
   fp = fopen("/root/1","rt+");
   rewind(fp);
   fseek(fp,59,0);
   fputc(c,fp);
   //a=fgetc(fp);
   // rewind(fp);
 //  fclose(fp);
  // fp = fopen("/root/1","rt+");
  // rewind(fp);
   fseek(fp,58,0);
   //d=onoff->value();
   a=b/10+'0';
   //printf("%c",a);
   fputc (a,fp);
   //c=fgetc(fp);
   //b=(a-48)*10+( fseek(fp,59,0);
   //onoff->setValue(b);    
   fclose(fp);
}
